class Time{

    /**
     * @param date
     * @returns {number}
     */
     static dateToTimestamp(date){
         if(date){
             return (new Date(date).getTime()/1000)
         }else{
             return 0;
         }
    }

    static timeToInt(time, split_tag = ':'){
        let times = time.split(split_tag)
        return times[0] * 3600 + times[1] * 60 + times[2]
    }
}
export default Time